// 后端权限返回路由
const backMenus = [
  {
    path: '/dashboard',
    name: 'Dashboard',
    component: 'empty',
    redirect: '/dashboard/analysis',
    meta: {
      type: 'menu',
      title: 'Dashboard',
      icon: 'menu'
    },
    children: [
      {
        path: 'analysis',
        name: 'Analysis',
        component: '/dashboard/analysis/index',
        meta: {
          title: '分析页',
          icon: '',
          affix: true
        }
      },
      {
        path: 'workbench',
        name: 'Workbench',
        component: '/dashboard/workbench/index',
        meta: {
          title: '工作台',
          icon: ''
        }
      }
    ]
  },
  {
    path: '/permission',
    name: 'Permission',
    component: 'empty',
    redirect: '/permission/front/page',
    meta: {
      type: 'menu',
      icon: 'key',
      title: '权限管理'
    },
    children: [
      {
        path: 'back',
        name: 'PermissionBackDemo',
        component: 'empty',
        meta: {
          title: '基于后台权限'
        },
        children: [
          {
            path: 'page',
            name: 'BackAuthPage',
            component: '/pages/permission/back/index',
            meta: {
              title: '页面权限'
            }
          },
          {
            path: 'btn',
            name: 'BackAuthBtn',
            component: '/pages/permission/back/Btn',
            meta: {
              title: '按钮权限'
            }
          }
        ]
      }
    ]
  },
  {
    path: '/level',
    name: 'Level',
    component: 'empty',
    redirect: '/level/menu1/menu1-1',
    meta: {
      type: 'menu',
      icon: 'folder-add',
      title: '多级菜单'
    },
    children: [
      {
        path: 'menu1',
        name: 'Menu1',
        meta: {
          title: 'Menu1',
          icon: 'folder'
        },
        component: 'empty',
        children: [
          {
            path: 'menu1-1',
            name: 'Menu11Demo',
            meta: {
              title: 'Menu1-1'
            },
            component: 'empty',
            children: [
              {
                path: 'menu1-1-1',
                name: 'Menu111Demo',
                component: '/pages/level/Menu111',
                meta: {
                  title: 'Menu1-1-1'
                }
              }
            ]
          },
          {
            path: 'menu1-2',
            name: 'Menu12Demo',
            component: '/pages/level/Menu12',
            meta: {
              title: 'Menu1-2'
            }
          }
        ]
      },
      {
        path: 'menu2',
        name: 'Menu2Demo',
        component: '/pages/level/Menu2',
        meta: {
          title: 'Menu2',
          icon: 'folder'
        }
      }
    ]
  },
  {
    path: '/system',
    name: 'System',
    component: 'empty',
    redirect: '/system/account',
    meta: {
      type: 'menu',
      icon: 'setting',
      title: '系统管理'
    },
    children: [
      {
        path: 'role',
        name: 'Role',
        meta: {
          title: '角色管理'
        },
        component: '/pages/system/role/index'
      },
      {
        path: 'menu',
        name: 'Menu',
        meta: {
          title: '菜单管理'
        },
        component: '/pages/system/menu/index'
      }
    ]
  },
  {
    path: '/frame',
    name: 'Frame',
    component: 'empty',
    meta: {
      icon: 'paperclip',
      orderNo: 5,
      title: '外部页面'
    },
    children: [
      {
        path: 'vue3',
        name: 'Vue3',
        meta: {
          type: 'iframe',
          frameSrc: 'https://v3.cn.vuejs.org',
          title: 'Vue3'
        },
        component: 'empty'
      },
      {
        path: 'elementPlus',
        name: 'ElementPlus',
        meta: {
          type: 'iframe',
          frameSrc: 'https://element-plus.gitee.io/zh-CN/',
          title: 'Element Plus'
        },
        component: 'empty'
      },
      {
        path: 'https://v3.cn.vuejs.org',
        name: 'DocExternal',
        meta: {
          type: 'link',
          title: 'Vue3(外链)'
        }
      }
    ]
  }
]

export default backMenus
